import React, { useState } from "react";
import ModalLocalDeploy from "@/components/ModalLocalDeploy";
/**
 * This is a simple proxy component that clicks on the DnD file uploader for the user.
 * @returns
 */
export default function AttachItem() {
  const [showLocalModal, setShowLocalModal] = useState(false);
  const showLocalDeploy = () => {
    setShowLocalModal(true);
  };
  const hideLocalDeploy = () => {
    setShowLocalModal(false);
  };
  return (
    <>
      <div className="flex items-center justify-center">
        <div className="flex items-center justify-start w-full max-w-[1200px]">
          <div
            style={{ color: "#fff", background: "#165DFF" }}
            className="flex items-center justify-center rounded-[20px] px-[15px] py-[6px] text-[14px] ml-[56px] cursor-pointer"
            onClick={showLocalDeploy}
          >
            立即本地部署模型
          </div>
        </div>
      </div>
      {showLocalModal && (
        <ModalLocalDeploy
          showLocalModal={showLocalModal}
          hideLocalDeploy={hideLocalDeploy}
        />
      )}
    </>
  );
}
